package com.blb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuaHao
 * @since 2019-11-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_product")
public class Product extends Model<Product> {

    private static final long serialVersionUID=1L;

    /**
     * 商品id
     */
    private String id;

    /**
     * 商品编号
     */
    private String pNumber;

    /**
     * 商品名称
     */
    private String pName;

    /**
     * 商品图片
     */
    private String pImg;

    /**
     * 商品价格
     */
    private Double pPrice;

    /**
     * 分类
     */
    private String pEnterprise;

    /**
     * 添加时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date pAddtime;

    /**
     * 申请状态
     */
    private String aStatus;

    /**
     * 商品状态
     */
    private String pStatus;

    /**
     * 公司id
     */
    private String companyId;

    /**
     * 产地
     */
    private String pLocal;

    /**
     * 保质期
     */
    private String pShelflife;

    /**
     * 材质
     */
    private String pMaterial;

    /**
     * 品牌
     */
    private String pBrand;

    /**
     * 商品质量
     */
    private Double pQuality;

    /**
     * 备注
     */
    private String pRemarks;
    /**
     * 类型
     */
    private String pKind;
    /**
     * 分类名
     */
    @TableField(exist = false)
    private String name;
    /*自定义属性*/
    @TableField(exist = false)
    private List<ProductAttribute> productAttributeList;

    @TableField(exist = false)
    private int count;

    @TableField(exist = false)
    private Cargo cargo;

    @TableField(exist = false)
    private  Order order;

    @TableField(exist = false)
    private  Company company;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
